import {createBrowserRouter,Navigate} from 'react-router-dom'
import App from '../App'
import List from '../component/List'
import Add from '../component/Add'
import Edit from '../component/Edit'
import AddFood from '../component/AddFood'

let router=createBrowserRouter([
    {
        path:"/",
        element:<App/>,
        children:[
            {
                path:"/list",
                element:<List/>
            },
            {
                path:"/add",
                element:<Add/>
            },
            {
                path:"/edit",
                element:<Edit/>
            },
            {
                path:"/addFood",
                element:<AddFood/>
            },
            {
                path:"/",
                element:<Navigate to="/list"/>
            },
        ]
    }
])

export default router